﻿using System;
using Microsoft.EntityFrameworkCore.Migrations;

namespace CustomsDocumentOA.Project.Migrations
{
    public partial class _111 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.AddColumn<int>(
                name: "Type",
                table: "CDOA_CustomerDetail",
                nullable: false,
                defaultValue: 0);

            migrationBuilder.CreateTable(
                name: "CDOA_ShareRecords",
                columns: table => new
                {
                    Id = table.Column<long>(nullable: false)
                        .Annotation("SqlServer:Identity", "1, 1"),
                    CreationTime = table.Column<DateTime>(nullable: false),
                    CreatorUserId = table.Column<long>(nullable: true),
                    cCustomerID = table.Column<int>(nullable: false),
                    cUserName = table.Column<string>(maxLength: 100, nullable: true),
                    cSharePassWord = table.Column<string>(maxLength: 20, nullable: true),
                    cExpirationTime = table.Column<DateTime>(nullable: true),
                    cExpirationDay = table.Column<int>(nullable: false)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_CDOA_ShareRecords", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "CDOA_ShareRecords");

            migrationBuilder.DropColumn(
                name: "Type",
                table: "CDOA_CustomerDetail");
        }
    }
}
